#ifndef OPENCVRENDERTHREAD_H
#define OPENCVRENDERTHREAD_H
#include <renderthreadbase.h>
#include <QImage>
#include <opencv.hpp>
// OpenCV相机线程
class OpenCVRenderThread : public RenderThreadBase
{
    Q_OBJECT
public:
    explicit OpenCVRenderThread(QObject *parent = nullptr){
        start();
        pause();
    };
signals:
    void in_update_window_thread(QImage image);
public:
    void open(int index_id);    // 打开opencv相机
    void close();               // 关闭opencv相机
    void render() override;
    QImage Mat2QImage(const cv::Mat &mat);
};

#endif // OPENCVRENDERTHREAD_H
